#include <stdlib.h>
#include "mylib.h"
#include "mystery.h"

extern const u16 mystery[38400];

int main(void)
{
		int i = 0;
    REG_DISPCNT = MODE3 | BG2_ENABLE;

		/* Hey fix this Draw the image with DMA instead ;D */
		REG_DMA3SAD = (vu32)mystery;
		REG_DMA3DAD = (vu32)videoBuffer;
		REG_DMA3CNT = 38400 | DMA_ON;
		
    while (1)
    {
        waitForVblank();
				/* Clear the screen here using DMA */
				REG_DMA3SAD = (vu32)&i;
				REG_DMA3DAD = (vu32)videoBuffer;
				REG_DMA3CNT = 38400 | DMA_ON | DMA_SOURCE_FIXED;
				/* Of course in a real mode3 game you don't have enough time to DMA clear the whole screen but just go with me here*/
				
    }
}
